import React, { Component } from 'react'
import QCevnets from "../utils/events1"
 class Right extends Component {
   state = {
     index:0
   }
   componentDidMount(){
    QCevnets.addListener("activeIndex",this.fn)
   }
   fn = (data)=>{
        console.log(data);
        this.setState({
          index:data
        })
   }
  render() {
    return (
      <div className='right'>
         {
           this.props.send[this.state.index].con
         }
      </div>
    )
  }
}

export default Right